package com.yunchang.springboot.mapper.mwsfinance;

import com.yunchang.springboot.models.mwsfinance.FInventoryDetails;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FInventoryDetailsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(FInventoryDetails record);

    int insertSelective(FInventoryDetails record);

    FInventoryDetails selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(FInventoryDetails record);

    int updateByPrimaryKey(FInventoryDetails record);

    /**
     * 根据reason和时间获取对应的数据
     * @param reason
     * @param time
     * @return
     */
    List<FInventoryDetails> selectByReasonAndCreateTime(String reason,String time);

    /**
     * 根据时间和是否生成库存数据获取对应的数据
     * @param isInventoryDaily
     * @param date
     * @return
     */
    List<FInventoryDetails> selectByIsInventoryDailyAndDate(@Param("isInventoryDaily") Integer isInventoryDaily,@Param("date") String date);

    /**
     * 根据fInventoryDetailsList对象集合更新是否生成库存数据的状态
     * @param fInventoryDetailsList
     * @return
     */
    int updateIsInventoryDailyByFInventoryDetailsList(@Param("fInventoryDetailsList") List<FInventoryDetails> fInventoryDetailsList);
}